package com.learn.training.multithread.chapter8.demo1;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class Task implements Runnable {

    private String result;

    @Override
    public void run() {
        this.result = Thread.currentThread().getName() + "   ：    " + longTimeCalculation();

    }

    String getResult() {
        return result;
    }

    private String longTimeCalculation() {
        return DateTimeFormatter.ISO_DATE_TIME.format(LocalDateTime.now());
    }
}
